package com.liveHere.www.dao;

import com.liveHere.www.po.Order;
import com.liveHere.www.po.User;

import java.sql.SQLException;
import java.time.LocalDate;
import java.util.ArrayList;

/**
 * @author Mo312
 */
public interface OrderDao {
    // 获取订单列表
    public abstract ArrayList<Order> getOrderList(User user) throws Exception;

    // 更改订单状态
    public abstract boolean updateOrderStatus(int orderId, String status) throws Exception;

    //更新订单退房日期
    public abstract boolean updateOrderCheckOutDate(int orderId, LocalDate checkOutDate) throws SQLException;

    // 新增订单
    public abstract boolean addOrder(Order order) throws Exception;

    // 根据订单ID获取订单
    public abstract Order getOrderById(int orderId) throws SQLException;

    // 根据店铺ID获取订单列表
    public abstract ArrayList<Order> getOrderListByShopId(int shopId) throws SQLException;

    // 根据状态和店铺ID获取订单列表
    public abstract ArrayList<Order> getOrdersByStatusAndShopId(String status, int shopId) throws SQLException;
}
